import httpInstance from "@/utils/http.js";
// 获取购物车集合
export const getShoppingCartList = () => {
    return httpInstance({
        url: '/user/shoppingCart/list',
        method: 'GET',
    })
}


// 修改购物车数量功能
export const editHoppingCart = (params) => {
    return httpInstance({
        url: '/user/shoppingCart',
        method: 'PUT',
        params
    })
}


// 购物车新增接口-new
export const newAddShoppingCartAdd = (params) => {
    return httpInstance({
        url: '/user/shoppingCart/add',
        method: 'POST',
        data:params
    })
}


// 购物车减菜接口-new
export const newShoppingCartSub = (params) => {
    return httpInstance({
        url: '/user/shoppingCart/sub',
        method: 'POST',
        data:params
    })
}


// 清除购物车
export const delShoppingCart = () => {
    return httpInstance({
        url: '/user/shoppingCart/clean',
        method: 'DELETE',
    })
}
